package 设计模式.command;

/**
 * @功能
 * @创建时间 2020/5/4
 */
public interface Command {
    void execute();
}
class ConcreteCommand implements Command{

    private Receiver receiver;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.action();

    }
}
